<?php
class Warehouse_transfer_model extends CI_Model {

   
    private $_tabla1 = 'transfer';
    private $_tabla2 = 'transfer_details';

    function __construct() {
        // Call the Model constructor
        parent::__construct();
    }

    public function comparaction_code($document_code){
        $query = $this->db->query("SELECT document_code FROM transfer where document_code = '".$document_code."'");
        $rs = $query->num_rows();
        return $rs;
    }
    
    public function add_transfer($data){
       return $this->db->insert($this->_tabla1, $data);
    }
    public function add_details_transfer($data){
       return $this->db->insert($this->_tabla2, $data);
    }
}